package cn.tedu.io;

import java.io.FileOutputStream;
import java.io.IOException;

public class WriteStringDemo {
    public static void main(String[] args) throws IOException {
        FileOutputStream fos = new FileOutputStream("demo.txt");
        String str = "duanyin,刻不容缓,我为什么克制不住我自己.阿弥陀佛.是因为性格懦弱.";
        byte[] data = str.getBytes("UTF-8");
        fos.write(data);
//        fos.write("南无阿弥陀佛阿弥陀佛大愿地藏王菩萨摩诃萨".getBytes("UTF-8"));
        System.out.println("写出完毕");
        fos.close();
    }
}
